using System;
using System.Collections.Generic;
using System.Drawing;
using System.Text;

namespace org.synthful.Drawing
{
    /// <summary>
    /// Offered under Apache Public Licence 2.0
    /// synthful.org
    /// blessedgeek [@] synthful.org
    /// </summary>
    public class DrawingUtils
    {
        static public Color addColor(Color color, int value)
        {
            if ((value > 0))
            {
                return
                    Color.FromArgb(
                        Math.Min(color.R + value, 255),
                        Math.Min(color.G + value, 255),
                        Math.Min(color.B + value, 255)
                    );
            }
            else
            {
                return
                    Color.FromArgb(
                        Math.Max(color.R + value, 0),
                        Math.Max(color.G + value, 0),
                        Math.Max(color.B + value, 0)
                    );
            }
        }

        static public Pen getBorderPen(Color tabColor)
        {
            return new Pen(addColor(tabColor, -50));
        }
    }
}
